package com.yonyou.cyxdms.sysAuth.service.feign;

import com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse;
import com.yonyou.cyxdms.sysAuth.service.entity.JwtInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(value = "ops-gateway", configuration = {})
public interface IAuthProviderService {
    @DeleteMapping("/gateway/jwt")
    @SuppressWarnings("all")
    public RestResultResponse<JwtInfo> delJwtInfo(@RequestHeader(name = "jwt") String jwt,
                                                  @RequestHeader(name = "nonce") String nonce,
                                                  @RequestHeader(name = "occurtime") String occurtime,
                                                  @RequestHeader(name = "sign") String sign);

    @PostMapping("/gateway/jwt")
    @SuppressWarnings("all")
    public RestResultResponse<JwtInfo> updateJwtInfo(@RequestHeader(name = "jwt") String jwt,
                                                     @RequestHeader(name = "nonce") String nonce,
                                                     @RequestHeader(name = "occurtime") String occurtime,
                                                     @RequestHeader(name = "sign") String sign,
                                                     @RequestBody Map<String, String> param);

    @GetMapping("/gateway/jwt")
    @SuppressWarnings("all")
    public RestResultResponse<JwtInfo> getJwtInfo(@RequestHeader(name = "jwt") String jwt,
                                                  @RequestHeader(name = "nonce") String nonce,
                                                  @RequestHeader(name = "occurtime") String occurtime,
                                                  @RequestHeader(name = "sign") String sign);
}
